package com.thh.project.common.exception;

import com.thh.project.model.common.enums.AppHttpCodeEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * @description:BusinessException 自定义异常类
 * @author: thh
 * @time: 2020/6/21 17:52
 */
@Getter
@Setter
public class CommonException extends  RuntimeException{

    private AppHttpCodeEnum appHttpCodeEnum;

    public CommonException(AppHttpCodeEnum appHttpCodeEnum) {
        super("错误代码" + appHttpCodeEnum.getCode() + "错误信息:" + appHttpCodeEnum.getErrorMessage());
        this.appHttpCodeEnum = appHttpCodeEnum;
    }
}
